﻿package plugin.roleN.compoment
{
    import flash.display.*;
    import morn.core.components.*;

    public class BaoShiShengJiItem extends Sprite
    {
        private var txt1:Label;
        private var txt2:Label;
        private var txt3:Label;
        private var img:UrlImage;

        public function BaoShiShengJiItem()
        {
            this.init();
            return;
        }// end function

        private function init() : void
        {
            this.txt1 = new Label();
            this.txt1.color = 2198016;
            this.txt1.font = "宋体";
            this.txt1.x = 0;
            this.txt1.isHtml = true;
            this.addChild(this.txt1);
            this.txt2 = new Label();
            this.txt2.color = 16770247;
            this.txt2.font = "宋体";
            this.txt2.isHtml = true;
            this.addChild(this.txt2);
            this.img = new UrlImage();
            this.img.url = "cs2_roleN/jiantou.png";
            this.img.x = this.txt2.x + this.txt2.width + 10;
            this.addChild(this.img);
            this.txt3 = new Label();
            this.txt3.color = 16770247;
            this.txt3.font = "宋体";
            this.txt3.isHtml = true;
            this.txt3.align = "left";
            this.txt3.x = this.img.x + 23 + 10;
            this.addChild(this.txt3);
            return;
        }// end function

        public function addText(param1:String, param2:String, param3:String) : void
        {
            var _loc_4:int = 0;
            this.txt1.text = param1;
            this.txt2.text = param2;
            this.txt3.text = param3;
            this.txt2.x = this.txt1.width + 2;
            if (param3)
            {
                this.img.visible = true;
                this.img.x = this.txt2.x + this.txt2.width + 10;
                this.txt3.x = this.img.x + 23 + 10;
                _loc_4 = this.txt3.x;
            }
            else
            {
                this.img.visible = false;
            }
            return;
        }// end function

    }
}
